/**
 * @author wangzd
 * @create 2021-11-07 12:57
 */
public class Main {
    public static void main(String[] args) {
        BookShelf bookShelf = new BookShelf(4);
        bookShelf.appendBook(new Book("wangzd1"));
        bookShelf.appendBook(new Book("wangzd2"));
        bookShelf.appendBook(new Book("wangzd3"));
        bookShelf.appendBook(new Book("wangzd4"));
        Iterator it = bookShelf.iterator();
        while (it.hasNext()){
            Book book = (Book) it.next();
            System.out.println(book.getName());
        }
    }
}
